<script setup>
import { RouterLink, RouterView } from 'vue-router'
</script>

<template>
  <div class="layout">
    <header class="header">
      <nav class="nav">
        <RouterLink to="/admin">后台首页</RouterLink>
        <RouterLink to="/admin/announcements">公告</RouterLink>
        <RouterLink to="/admin/staff">成员</RouterLink>
        <RouterLink to="/admin/gallery">画廊</RouterLink>
        <RouterLink to="/admin/donors">捐赠者</RouterLink>
        <RouterLink to="/admin/password">密码</RouterLink>
      </nav>
    </header>
    <main class="content">
      <RouterView />
    </main>
  </div>
</template>

<style scoped>
.header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.nav {
  display: flex;
  gap: 12px;
}
.nav a {
  color: #409EFF;
  text-decoration: none;
}
.nav a.router-link-active {
  font-weight: 600;
}
.content {
  max-width: 1080px;
  margin: 20px auto;
  padding: 0 16px;
}
</style>
